projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4e4de3
)
stringlist: Call splice() for adding items after construction
author
Benjamin Otte
<otte@redhat.com>
Tue, 30 Jun 2020 21:31:02 +0000
(23:31 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Sun, 5 Jul 2020 00:59:21 +0000
(
02:59
+0200)
This has the benefit of actually allowing NULL to be passed.
gtk/gtkstringlist.c
patch
|
blob
|
history
diff --git
a/gtk/gtkstringlist.c
b/gtk/gtkstringlist.c
index a3e2af5f68c4cebbb25043bff4ef17eef89ada5d..608081d5002452066564d15a2fe69513032a03b8 100644
(file)
--- a/
gtk/gtkstringlist.c
+++ b/
gtk/gtkstringlist.c
@@
-434,12
+434,10
@@
GtkStringList *
gtk_string_list_new (const char * const *strings)
{
GtkStringList *self;
- guint i;
self = g_object_new (GTK_TYPE_STRING_LIST, NULL);
- for (i = 0; strings[i]; i++)
- g_sequence_append (self->items, gtk_string_object_new (strings[i]));
+ gtk_string_list_splice (self, 0, 0, strings);
return self;
}